stage.set_background_color("lightblue")
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_left(45)
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_right(45)
sprite = codesters.Sprite("earth")
people_sprites = ['person1', 'person2', 'person3', 'person4', 'person5', 'person6',
'person7', 'person8','person9', 'person10', 'person11', 'person12']
rotate = 90
for value in people_sprites:
# add code here
sprite = codesters.Sprite(value)
stage.wait(0.5)
sprite.set_size(0.3)
sprite.set_speed(5)
sprite.move_forward(120)
sprite.turn_right(90)
sprite.rotate_origin(rotate)
rotate += 30
# sprite = codesters.Text("text", x, y)
sprite = codesters.Text("STRENGTH IN DIVERSITY", 0, 200)
t = codesters.Teacher()
try:
colors = t.get_parameters_for_function('set_background_color')
tval1 = colors[0][0]
except:
tval1 = "DNE"
try:
tval2 = rotate
except:
tval2 = "DNE"
try:
texts = t.get_parameters_for_function('set_speed')
tval3 = int(texts[0][0])
except:
tval3 = "DNE"
print(tval2)
t1 = TestObjective()
t1.add_success(tval1 != '"lightblue"', "Great job!")
t1.add_failure(tval1 == None, "Oops! Did you delete stage.set_background_color()?")
t1.add_failure(tval1 == '"lightblue"', "Make sure you complete Requirement #1!")
t2 = TestObjective()
t2.add_success(tval2 != 450 , "Great job!")
t2.add_failure(tval2 == "DNE", "Oops! Did you delete the rotate variable?")
t2.add_failure(tval2 == 450 , "Make sure you complete Requirement #2!")
t3 = TestObjective()
t3.add_success(tval3 != 5, "Great job!")
t3.add_failure(tval3 == 5, "Make sure you complete Requirement #3!")
t3.add_failure(tval3 == "DNE", "Did you delete sprite.set_speed()?")
tester = TestManager()
tester.add_test_list([t1,t2,t3])
tester.run_tests()
tester.display_first_feedback()